package com.example.basic.base;


/**
 * Created by IntelliJ IDEA.
 * Author: suntaotao
 * Date: 2019/11/21
 * Time: 15:07
 * Describe: 补充的MybatisPlus 支持 SQL 方法
 * To change this template use File | Settings | File Templates.
 */

public enum MySqlMethod {

    /**
     * 修改
     */
    UPDATE_BY_ID("updateById", "根据ID 选择修改数据", "<script>\nUPDATE %s %s WHERE %s=#{%s} %s\n</script>"),
    UPDATE("update", "根据 whereEntity 条件，更新记录", "<script>\nUPDATE %s %s %s %s\n</script>");

    private final String method;
    private final String desc;
    private final String sql;

    MySqlMethod(String method, String desc, String sql) {
        this.method = method;
        this.desc = desc;
        this.sql = sql;
    }

    public String getMethod() {
        return method;
    }

    public String getDesc() {
        return desc;
    }

    public String getSql() {
        return sql;
    }
}
